import request from '@/utils/request'

export function upload() {
  return request({
    url: '/api/admin/excel/export_question_template',
    method: 'post',
    data: null, // 参数
    responseType: "blob" // 表明返回服务器返回的数据类型
  })
}
  // changeStatus: id => post('/api/admin/question/changeStatus/' + id),
  export function changeStatus(id) {
    return request({
      url: '/api/admin/question/changeStatus/' + id,
      method: 'post'
    })
  }
  // pageList: query => post('/api/admin/question/page', query),
  export function pageList(data) {
    return request({
      url: '/api/admin/question/page',
      method: 'post',
      data: data
    })
  }
  // edit: query => post('/api/admin/question/edit', query),
  export function edit(data) {
    return request({
      url: '/api/admin/question/edit',
      method: 'post',
      data: data
    })
  }
  // select: id => post('/api/admin/question/select/' + id),
  export function select(id) {
    return request({
      url: '/api/admin/question/select/' + id,
      method: 'post'
    })
  }
  // deleteQuestion: id => post('/api/admin/question/delete/' + id)
  export function deleteQuestion(id) {
    return request({
      url: '/api/admin/question/delete/' + id,
      method: 'post'
    })
  }

